#include <iostream>  //C++的标准输入输出流头文件 
using namespace std; //我要使用命名空间std
/*
	引用发明：为了提高程序的运行效率
*/
struct student
{
	char name[10];
	int age;
	float score;
	char address[100];
};

void fun1(struct student stu)
{
	cout<<"fun1中name地址："<<(int *)(stu.name)<<endl;
	cout<<"fun1中age地址："<<&(stu.age)<<endl;
	cout<<"fun1中score地址："<<&(stu.score)<<endl;
	cout<<"fun1中address地址："<<(int *)(stu.address)<<endl;
}

void fun2(struct student &stu)
{
	cout<<"fun2中name地址："<<(int *)(stu.name)<<endl;
	cout<<"fun2中age地址："<<&(stu.age)<<endl;
	cout<<"fun2中score地址："<<&(stu.score)<<endl;
	cout<<"fun2中address地址："<<(int *)(stu.address)<<endl;
}

int main()  
{
	struct student stu={"张三",18,85.5,"广州市从化区"};
	cout<<"实参中name地址："<<(int *)(stu.name)<<endl;
	cout<<"实参中age地址："<<&(stu.age)<<endl;
	cout<<"实参中score地址："<<&(stu.score)<<endl;
	cout<<"实参中address地址："<<(int *)(stu.address)<<endl;
	fun1(stu);
	fun2(stu);
	
	return 0;
}


